package pub.tbc.atps.config;

import com.google.common.collect.Lists;
import lombok.ToString;
import pub.tbc.atps.process.Handler;

import java.util.LinkedList;

/**
 * 处理器不含属性信息，线程安全，用全局单例提高性能
 *
 * @author tbc on 2016/12/1 0:51.
 */
@ToString
public class HandlerStore {
    private static LinkedList<Handler> handlers = Lists.newLinkedList();
//    private static LinkedList<Class<Handler>> handlers = Lists.newLinkedList();

    public static void add(Handler handler) {
        handlers.add(handler);
    }

    public static LinkedList<Handler> getHandlers() {
        return handlers;
    }

}
